﻿///* 
// * author: www.cnblogs.com/luminji
// * date  : 2012/02/01
// */
//using System;
//using System.Collections.Generic;
//using System.Linq;
//using System.Text;
//using System.Web.Mvc;
//using Luminji.Core.Web.Cookie;
//using Luminji.Exam.Model.Users;
//using Luminji.ExamWeb.Models;
//using Microsoft.VisualStudio.TestTools.UnitTesting;

//namespace Luminji.ExamWeb.Tests.Web.Controllers.Account
//{
//    [TestClass]
//    public class AccountControllerRegistTest : AccountControllerTest
//    {
//        [TestMethod]
//        public void ShouldGotoAccountIndexWhenRegisted()
//        {
//            RegisterModel user = new RegisterModel() { UserName = "abc", Password= "123" };
//            RedirectToRouteResult re = _controller.Register(user) as RedirectToRouteResult;
//            Assert.AreEqual("Account", re.RouteValues["controller"]);
//            Assert.AreEqual("Index", re.RouteValues["action"]);
//        }

//        [TestMethod]
//        public void ShouldSetCookieWhenRegisted()
//        {
//            RegisterModel user = new RegisterModel() { UserName = "abc", Password = "123" };
//            RedirectToRouteResult re = _controller.Register(user) as RedirectToRouteResult;
//            var userExpected = CookieHelper.GetCookieValue<LogOnModel>(_controller.Request, "LogOnModel");
//            Assert.AreEqual("abc", userExpected.UserName);
//        }
//    }
//}
